package com.chd.driversystem.domain;


import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by shawnfly on 17-5-2.
 */

public class Locations implements Serializable{
    private List<Coordinate> locations; //坐标链
    private Date date;

    public Locations(Date date) {
        locations = new ArrayList<>();
        this.date = date;
    }

    public List<Coordinate> getLocations() {
        return locations;
    }

    public void add(Double lng, Double lat) {
        locations.add(new Coordinate(lng, lat));
    }

    public Date getDate() {
        return date;
    }

    class Coordinate {
        Double lng;  //经度
        Double lat;  //纬度

        public Coordinate(Double lng, Double lat) {
            this.lng = lng;
            this.lat = lat;
        }
    }
}
